import request from '@/config/axios'

export interface DrawingStandardArchivesVO {
  id: number
  drawingNumber: string
  partName: string
  versionNumber: string
  dictDrawingType: number
  dictEnableStatus: number
}

// 查询技术管理-图纸制作-标准图纸档案列表
export const getDrawingStandardArchivesPage = async (params) => {
  return await request.get({ url: `/technology/drawing-standard-archives/page`, params })
}

// 查询技术管理-图纸制作-标准图纸档案详情
export const getDrawingStandardArchives = async (id: number) => {
  return await request.get({ url: `/technology/drawing-standard-archives/get?id=` + id })
}

// 新增技术管理-图纸制作-标准图纸档案
export const createDrawingStandardArchives = async (data: DrawingStandardArchivesVO) => {
  return await request.post({ url: `/technology/drawing-standard-archives/create`, data })
}

// 修改技术管理-图纸制作-标准图纸档案
export const updateDrawingStandardArchives = async (data: DrawingStandardArchivesVO) => {
  return await request.put({ url: `/technology/drawing-standard-archives/update`, data })
}

// 删除技术管理-图纸制作-标准图纸档案
export const deleteDrawingStandardArchives = async (id: number) => {
  return await request.delete({ url: `/technology/drawing-standard-archives/delete?id=` + id })
}

// 导出技术管理-图纸制作-标准图纸档案 Excel
export const exportDrawingStandardArchives = async (data) => {
  return await request.download({ url: `/technology/drawing-standard-archives/export-excel`, data })
}
